/* 订单管理 */
const User = () => import('../pages/User')
const Role = () => import('../pages/Role')
const Menu = () => import('../pages/Menu')
const Dept = () => import('../pages/Dept')
const Job = () => import('../pages/Job')
const Dict = () => import('../pages/Dict')

const Mnt = () => import('../pages/Mnt')
const ServerDeploy = () => import('../pages/Mnt/ServerDeploy')
const App = () => import('../pages/Mnt/App')
const Deploy = () => import('../pages/Mnt/Deploy')
const DeployHistory = () => import('../pages/Mnt/DeployHistory')
const Database = () => import('../pages/Mnt/Database')

const Timing = () => import('../pages/Timing')

/* 需要权限判断的路由 */
const dynamicRoutes = [
    {
        path: '/user',
        component: User,
        name: 'User',
        meta: {
            name: '用户管理',
            icon: 'icon-email'
        },
        children: []
    },
    {
        path: '/role',
        component: Role,
        name: 'Role',
        meta: {
            name: '角色管理',
            icon: 'icon-email'
        },
        children: []
    },

    {
        path: '/menu',
        component: Menu,
        name: 'Menu',
        meta: {
            name: '菜单管理',
            icon: 'icon-email'
        },
        children: []
    },

    {
        path: '/dept',
        component: Dept,
        name: 'Dept',
        meta: {
            name: '部门管理',
            icon: 'icon-email'
        },
        children: []
    },

    {
        path: '/job',
        component: Job,
        name: 'Job',
        meta: {
            name: '工作管理',
            icon: 'icon-email'
        },
        children: []
    },

    {
        path: '/dict',
        component: Dict,
        name: 'Dict',
        meta: {
            name: '字典管理',
            icon: 'icon-email'
        },
        children: []
    },

    {
        path: '/mnt',
        component: Mnt,
        name: 'Mnt',
        meta: {
            name: '运维管理',
            icon: 'icon-order-manage'
        },
        children: [
            {
                path: 'serverDeploy',
                name: 'ServerDeploy',
                component: ServerDeploy,
                meta: {
                    name: '服务器',
                    icon: 'icon-home'
                }
            },
            {
                path: 'app',
                name: 'App',
                component: App,
                meta: {
                    name: '应用管理',
                    icon: 'icon-product-manage'
                }
            },
            {
                path: 'deploy',
                name: 'Deploy',
                component: Deploy,
                meta: {
                    name: '部署管理',
                    icon: 'icon-product-manage'
                }
            },
            {
                path: 'deployHistory',
                name: 'DeployHistory',
                component: DeployHistory,
                meta: {
                    name: '部署备份',
                    icon: 'icon-product-manage'
                }
            },
            {
                path: 'database',
                name: 'Database',
                component: Database,
                meta: {
                    name: '数据库管理',
                    icon: 'icon-product-manage'
                }
            }
        ]
    },
    {
        path: '/timing',
        component: Timing,
        name: 'Timing',
        meta: {
            name: '任务调度',
            icon: 'icon-email'
        },
        children: []
    }
]

export default dynamicRoutes
